package com.roncoo.eshop.datasync.rabbitmq;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 发送rabbitmq消息
 * @author lileping
 *
 */
@Component
public class RabbitmqSender {

	@Autowired
	private AmqpTemplate rabbitmqTemplate;
	
	public void send(String queue, String message) {
		rabbitmqTemplate.convertAndSend(queue, message);
	}
	
}
